import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        component: HomeView,
        children: [
            {
                path: '/sys-admin/product/pet',
                component: () => import('../views/sys-admin/product/PetListView.vue')
            },
            {
                path: '/sys-admin/product/pet/add-new',
                component: () => import('../views/sys-admin/product/PetAddNewView.vue')
            },
            {
                path: '/sys-admin/product/breed',
                component: () => import('../views/sys-admin/product/BreedListView.vue')
            },
            {
                path: '/sys-admin/product/breed/add-new',
                component: () => import('../views/sys-admin/product/BreedAddNewView.vue')
            },
            {
                path: '/sys-admin/product/home',
                component: () => import('../views/sys-admin/product/HomeListView.vue')
            },
            {
                path: '/sys-admin/client/client',
                component: () => import('../views/sys-admin/client/ClientListView.vue')
            },
            {
                path: '/sys-admin/client/add-new',
                component: () => import('../views/sys-admin/client/ClientAddNewView.vue')
            },
          {
            path: '/sys-admin/product/spu-management/sku-list',
            component: () => import('../views/sys-admin/product/SkuListView.vue')
          },
          {
            path: '/sys-admin/product/album/add-new',
            component: () => import('../views/sys-admin/product/AlbumAddNewView.vue')
          },
          {
            path: '/sys-admin/product/album',
            component: () => import('../views/sys-admin/product/AlbumListView.vue')
          },
          {
            path: '/sys-admin/product/attributeTemplate/add-new',
            component: () => import('../views/sys-admin/product/AttributeTemplateAddNewView.vue')
          },
          {
            path: '/sys-admin/product/attributeTemplate',
            component: () => import('../views/sys-admin/product/AttributeTemplateListView.vue')
          },
          {
            path: '/sys-admin/product/category',
            component: () => import('../views/sys-admin/product/CategoryListView.vue')
          },
          {
            path: '/sys-admin/product/category/add-new',
            component: () => import('../views/sys-admin/product/CategoryAddNewView.vue')
          },
          {
            path: 'sys-admin/product/brand',
            component: () => import('../views/sys-admin/product/BrandListView.vue')
          },
          {
            path: '/sys-admin/product/home',
            component: () => import('../views/sys-admin/product/HomeListView.vue')
          },
          {
            path: '/sys-admin/product/spu/add-new-1',
            component: () => import('../views/sys-admin/product/SpuAddNewView1.vue')
          },
          {
            path: '/sys-admin/product/spu/add-new-2',
            component: () => import('../views/sys-admin/product/SpuAddNewView2.vue')
          },
          {
            path: '/sys-admin/product/spu/add-new-3',
            component: () => import('../views/sys-admin/product/SpuAddNewView3.vue')
          },
          {
            path: '/sys-admin/product/spu/add-new-4',
            component: () => import('../views/sys-admin/product/SpuAddNewView4.vue')
          },
          {
            path: '/sys-admin/product/spu-management',
            component: () => import('../views/sys-admin/product/SpuManagement.vue')
          },
          {
            path: '/sys-admin/product/album/picture-list',
            component: () => import('../views/sys-admin/product/AlbumPictureListView.vue')
          },
          {
            path: '/sys-admin/product/attribute',
            component: () => import('../views/sys-admin/product/AttributeListView.vue')
          },
          {
            path: '/sys-admin/product/attribute/add-new',
            component: () => import('../views/sys-admin/product/AttributeAddNewView.vue')
          },
            {
                path: '/sys-admin/product/order/add-new',
                component: () => import('../views/sys-admin/product/OrderAddNewView.vue')
            },
            {
                path: '/sys-admin/product/order',
                component: () => import('../views/sys-admin/product/OrderListView.vue')
            },


            // ======================== 权限管理 ========================
          {
            path: '/sys-admin/permission/admin/add-new',
            component: () => import('../views/sys-admin/permission/AdminAddNewView')
          },
          {
            path: '/sys-admin/permission/admin',
            component: () => import('../views/sys-admin/permission/AdminListView')
          },
          {
            path: '/sys-admin/permission/permission/add-new',
            component: () => import('../views/sys-admin/permission/PermissionAddNew')
          },
          {
            path: '/sys-admin/permission/permission',
            component: () => import('../views/sys-admin/permission/PermissionListView')
          },

        ]

    }
  ,
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/loginView')
  }



]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
